package cn.edu.scau.sec.rw.view;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import cn.edu.scau.sec.rw.controllers.CommonBridge;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Paint;
import javafx.stage.Modality;
import javafx.stage.Screen;
import javafx.stage.Stage;
import javafx.stage.StageStyle;


public class DeviceUI {
	public DeviceUI() {
        CommonBridge.stage = new Stage();
        Stage stage = CommonBridge.stage;
        try {
 //           Parent root = FXMLLoader.load(getClass().getResource(fxml));
  //          Scene scene = new Scene(root);
//            scene.getStylesheets().add(css);
//            stage.setScene(scene);
//            stage.setTitle("Device");
//            stage.initStyle(StageStyle.TRANSPARENT);
//            stage.initModality(Modality.APPLICATION_MODAL);
//            stage.initOwner(CommonBridge.primaryStage);
//            stage.show();  
    
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(getClass().getResource("/cn/edu/scau/sec/rw/view/fxml/device.fxml"));
            Parent root = (Parent)loader.load();
            Scene scene = new Scene(root);	
            stage.setScene(scene);
            stage.setTitle("Device");
            stage.show();


        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}
